A wellbore can be drilled from a subterranean formation for extracting hydrocarbons (e.g., oil or gas) from the subterranean formation. Various well tools can be positioned in the wellbore for performing well operations. For example, a well tool that includes a sensor can be positioned in the wellbore for measuring characteristics of the wellbore.